<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Nome do Sistema</title>

	<h:outputStylesheet name="style.css" library="css" />
	<h:outputScript name="jtooltip.js" library="js" />
	<h:outputScript name="primefaceslocales.js" library="js" />

</h:head>

<h:body>

	<div id="headerPrincipal">
		<div class="wrapper">Header</div>
	</div>
	<p:outputPanel autoUpdate="true">
		<p:messages id="mensagensContact" showDetail="false"
			showSummary="true" />
	</p:outputPanel>
	<div class="wrapper">
		<!-- end #header -->
		<div id="bodyPrincipal">
			<div id="content">
				<div class="content1">

					<h:form id="form">

						<p:growl id="messages" showDetail="true" />

						<p:tree id="treeSingle" value="#{treeBean.root}" var="node"
							selection="#{treeBean.selectedNode}" expanded="true"
							expandAnim="FADE_IN" collapseAnim="FADE_OUT"
							propagateSelectionUp="true" propagateSelectionDown="true"
							selectionMode="single">

							<p:treeNode>
								<h:outputText value="#{node}" />
							</p:treeNode>
						</p:tree>

						<p:commandButton value="Display Selected" update="messages"
							actionListener="#{treeBean.displaySelectedSingle}"
							id="btnDisplay" />

						<p:commandButton value="+" id="btnAddNode" 
							process="@this,treeSingle" 
							update="panelEditModule"
							action="#{treeBean.addNode()}">
						</p:commandButton>

						<p:dialog id="panelEditModule" 
							visible="#{treeBean.showDialog}"
							rendered="true"
							widgetVar="dlgModule"
							resizable="false" closable="false" showHeader="false"
							position="center" modal="true" showEffect="clip"
							hideEffect="fold">
							<ui:include src="moduleEdit.xhtml" >
								<ui:param name="idRender" value=":form:treeSingle" />
							</ui:include>
						</p:dialog>
					</h:form>

				</div>
				<div style="clear: both;">&nbsp;</div>
			</div>
			<!-- end #content -->
		</div>
		<!-- end #page -->

	</div>

	<div style="clear: both;">&nbsp;</div>

	<div id="footerPrincipal">
		<div class="wrapper"></div>
	</div>

</h:body>
</html>